Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  Drive  Types  

 Content of List Drive Types.vbs
MD5 Hash: 5F88C686C6C97CC533E06B923677B44A
' Description: Identifies the drive type (floppy drive, hard drive, CD-ROM, etc.) for each physical drive installed on a computer.


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colDisks = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk")

For Each objDisk in colDisks
Wscript.Echo "DeviceID: "& objDisk.DeviceID
Select Case objDisk.DriveType
Case 1
Wscript.Echo "No root directory. Drive type could not be " _
& "determined."
Case 2
Wscript.Echo "DriveType: "& "Removable drive."
Case 3
Wscript.Echo "DriveType: "& "Local hard disk."
Case 4
Wscript.Echo "DriveType: "& "Network disk."
Case 5
Wscript.Echo "DriveType: "& "Compact disk."
Case 6
Wscript.Echo "DriveType: "& "RAM disk."
Case Else
Wscript.Echo "Drive type could not be determined."
End Select
Next

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a